#ifndef MCLINESEGMENTPARAMETRICWINDOW_H
#define MCLINESEGMENTPARAMETRICWINDOW_H

#include <QWidget>
#include <MCCommand.h>
#include <MCSegmentVisual.h>

namespace Ui {
class MCLineSegmentParametricWindow;
}

class MCLineSegmentParametricWindow : public QWidget
{
    Q_OBJECT

public:
    explicit MCLineSegmentParametricWindow(MCCommand *command, MCSegmentVisual *segmentVisual, QWidget *parent = nullptr);
    ~MCLineSegmentParametricWindow();

private slots:
    void on_lineEdit_textChanged(const QString &arg1);

    void on_lineEdit_2_textChanged(const QString &arg1);

    void on_lineEdit_3_textChanged(const QString &arg1);

    void on_lineEdit_4_textChanged(const QString &arg1);

    void on_lineEdit_5_textChanged(const QString &arg1);

    void on_lineEdit_6_textChanged(const QString &arg1);

    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

private:

    void updateValues();
    void resetLength();
    void resetPoints();
    bool isTextValid(QString text);

private:
    Ui::MCLineSegmentParametricWindow *ui;

    MCLineSegment2D _lineSegment;
    MCSegmentVisual *_segmentVisual;
    MCCommand *_command;
};

#endif // MCLINESEGMENTPARAMETRICWINDOW_H
